package com.ruoyi.compete.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.compete.mapper.OtherTechInnCompeteMapper;
import com.ruoyi.compete.domain.OtherTechInnCompete;
import com.ruoyi.compete.service.IOtherTechInnCompeteService;

/**
 * 其他科技创新竞赛Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class OtherTechInnCompeteServiceImpl implements IOtherTechInnCompeteService 
{
    @Autowired
    private OtherTechInnCompeteMapper otherTechInnCompeteMapper;

    /**
     * 查询其他科技创新竞赛
     * 
     * @param oticId 其他科技创新竞赛主键
     * @return 其他科技创新竞赛
     */
    @Override
    public OtherTechInnCompete selectOtherTechInnCompeteByOticId(Long oticId)
    {
        return otherTechInnCompeteMapper.selectOtherTechInnCompeteByOticId(oticId);
    }

    /**
     * 查询其他科技创新竞赛列表
     * 
     * @param otherTechInnCompete 其他科技创新竞赛
     * @return 其他科技创新竞赛
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "d")
    public List<OtherTechInnCompete> selectOtherTechInnCompeteList(OtherTechInnCompete otherTechInnCompete)
    {
        return otherTechInnCompeteMapper.selectOtherTechInnCompeteList(otherTechInnCompete);
    }

    /**
     * 新增其他科技创新竞赛
     * 
     * @param otherTechInnCompete 其他科技创新竞赛
     * @return 结果
     */
    @Override
    public int insertOtherTechInnCompete(OtherTechInnCompete otherTechInnCompete)
    {
        return otherTechInnCompeteMapper.insertOtherTechInnCompete(otherTechInnCompete);
    }

    /**
     * 修改其他科技创新竞赛
     * 
     * @param otherTechInnCompete 其他科技创新竞赛
     * @return 结果
     */
    @Override
    public int updateOtherTechInnCompete(OtherTechInnCompete otherTechInnCompete)
    {
        otherTechInnCompete.setUpdateTime(DateUtils.getNowDate());
        return otherTechInnCompeteMapper.updateOtherTechInnCompete(otherTechInnCompete);
    }

    /**
     * 批量删除其他科技创新竞赛
     * 
     * @param oticIds 需要删除的其他科技创新竞赛主键
     * @return 结果
     */
    @Override
    public int deleteOtherTechInnCompeteByOticIds(Long[] oticIds)
    {
        return otherTechInnCompeteMapper.deleteOtherTechInnCompeteByOticIds(oticIds);
    }

    /**
     * 删除其他科技创新竞赛信息
     * 
     * @param oticId 其他科技创新竞赛主键
     * @return 结果
     */
    @Override
    public int deleteOtherTechInnCompeteByOticId(Long oticId)
    {
        return otherTechInnCompeteMapper.deleteOtherTechInnCompeteByOticId(oticId);
    }
}
